<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>诚信考试</title>
    <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.6.0.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" style="width: 600px;">
    <form method="post" action="${pageContext.request.contextPath}/Student/winding/${sessionScope.user.id}/${gradeId}">
        <security:csrfInput/>
        <h2>选择题</h2>
        <c:forEach items="${detailExam.question.choiceList}" var="choice" varStatus="s">
            <h4>${s.count}.${choice.title}</h4>
            <h6><input type="radio" value="A" name="choice#${choice.id}">A . ${choice.questionA}</h6>
            <h6><input type="radio" value="B" name="choice#${choice.id}">B . ${choice.questionB}</h6>
            <h6><input type="radio" value="C" name="choice#${choice.id}">C . ${choice.questionC}</h6>
            <h6><input type="radio" value="D" name="choice#${choice.id}">D . ${choice.questionD}</h6>
        </c:forEach>
        <hr>
        <h2>填空题</h2>
        <c:forEach items="${detailExam.question.fillList}" var="fill" varStatus="s">
            <h4>${s.count}.${fill.title}</h4>
            <input name="fill#${fill.id}" type="text" class="form-control input-lg" placeholder="请输入你的答案">
        </c:forEach>
        <hr>
        <h2>简答题</h2>
        <c:forEach items="${detailExam.question.shortAnswerList}" var="sa" varStatus="s">
            <h4>${s.count}.${sa.title}</h4>
            <input name="shortAnswer#${sa.id}" type="text" class="form-control input-lg" placeholder="请输入你的答案">
        </c:forEach>
        <br>
        <x style="text-align: center">
            <button type="submit" class="btn btn-default">提交</button>
        </x>
    </form>
</div>
</body>
</html>
